package day03;

import java.util.Scanner;

public class IfElseIfDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double price = sc.nextDouble();

        if (price>=50000){
            System.out.println(price*0.5);
        }else if (price>=10000){
            System.out.println(price*0.6);
        }else if (price>=5000){
            System.out.println(price*0.7);
        }else if (price>=1000){
            System.out.println(price*0.8);
        }else if (price>=500){
            System.out.println(price*0.9);
        }else {
            System.out.println(price);
        }
    }
}
